<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页</title>
  <link rel="stylesheet" href="../css/list.css">
  <script src="../libs/requirejs/require.min.js" data-main="../js/list"></script>
</head>
<body>
    <a href="../index.html"><div class="logo"></div></a>
    <div id="ball"></div>
    
    <div class="address"></div>
    <div class="hot-head">
        <ul>
            <li><a href="">新品</a></li>
            <li><a href="">热销</a></li>
            <li><a href="">推荐</a></li>
            <li><a href="">价格</a></li>
            <li><a href="">折扣</a></li>
            <li class="page"></li>
        </ul>
    </div>
  <!-- 渲染推荐商品的数据 -->
  <ul class="hot"></ul>

  <!-- 定义渲染推荐商品项的模板 -->
  <script type="text/html" id="hot-template">
    {{each products prod}}
    <li class="hot-item" data-id="{{prod.id}}">
      <div><img class="image" src="{{prod.image}}" alt=""></div>
      <div class="title">{{prod.title}}</div>
      <div>
        <span class="money1">￥</span><span class="price">{{prod.price}}</span>
        <span class="money2">￥</span><span class="originprice">{{prod.originPrice}}</span>
        <button class="add-to-cart">加入购物车</button>
      </div>
    </li>
    {{/each}}
  </script>

</body>
</html>